package com.ruirenyun.util.annotation.validator;


import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.Objects;

/**
 * Created with IntelliJ IDEA.
 *
 * @author Deng Ye
 * @version 1.0
 * @date 2020/9/11
 * @description 参数校验工具类 不为空
 * @modifiedBy
 */
public class NotNullValidator implements ConstraintValidator<NotNull, Object> {
    @Override
    public boolean isValid(Object o, ConstraintValidatorContext context) {
        return Objects.nonNull(o);
    }
}
